/**   
 * @Title: UserInfoDetailController.java 
 * @Package com.esun.controller 
 * @Description: TODO(用户详细信息controller) 
 * @author Miko baoz@500wan.com   
 * @date 2011-3-14 下午07:43:54  
 */
package com.esun.rabbit2.communicaters.recharg;

import com.esun.config.Config;

/**
 * @ClassName: UserInfoDetailController
 * @Description: TODO(用户详细信息controller)
 * @author Miko baoz@500wan.com
 * @date 2011-3-14 下午07:43:54
 * 
 */
public class UserInfoDetailController {
	private boolean isCard;
	private String userRealName;

	/**
	 * @return the userRealName
	 */
	public String getUserRealName() {
		return userRealName;
	}

	/**
	 * @return the bankName
	 */
	public String getBankName() {
		return bankName;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return Msg;
	}

	private String bankName;
	private String Msg;

	public String[] getUserInfoDetail(String userName, String userSession) {

		try {
			String send = userName + DataShare.ONESPACE + userSession + DataShare.ONESPACE;

			Bussiness10203 b10203 = new Bussiness10203(userSession, send, DataShare.USER_MOREINFO, DataShare.CT_NONE, DataShare.ET_NONE);

			if ((b10203.getResult()).length < 5) {
				for (int i = 0; i < b10203.getResult().length; i++) {
					Msg += b10203.getResult()[i];
				}
			} else {
				if ((b10203.getResult())[0].indexOf(Config.NUM0) == 0) {
					isCard = false;
				} else {
					isCard = true;
				}
				userRealName = b10203.getResult()[7];
				bankName = b10203.getResult()[1];
			}
			RechargeUserInfo.getUserInfo().setBandingCard(isCard);
			RechargeUserInfo.getUserInfo().setCardNum((b10203.getResult())[0]);
			RechargeUserInfo.getUserInfo().setBanckName(bankName);

			return b10203.getResult();
		} catch (Exception e) {
			return new String[0];
		}

	}
}
